<%@ page language="java" import="mr.zhang.dao.domain.Merchant" pageEncoding="UTF-8"%>
<%@ page import="mr.zhang.util.PageModelMerChant" %>
<%@ page import="java.util.List" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>商家信息列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<center>
		<font color="red" size="10">商家信息列表</font>
		<br>
        <br>
      <%
      
      PageModelMerChant pageModelMerChant = (PageModelMerChant)request.getAttribute("pageModelMerChant");
      
     List<Merchant> list =  pageModelMerChant.getList();
      
       %>
		<table width="1120" border="1">
			<tr>
			<td width="70">商家ID</td>
				<td width="90">商家名称</td>
				<td width="90">商家地址</td>
				<td width="100">商家联系电话</td>
				<td width="100">商家电子邮件</td>
				<td width="160">商家地理位置经度</td>
				<td width="160">商家地理位置纬度</td>
				<td width="100">商家QQ号码</td>
				<td width="128">商家微信号码</td>
				<td width="70">删除</td>
				<td width="70">更新</td>
			</tr>
			<%
			for(int i = 0;i<list.size();i++){
			
			Merchant merchant = list.get(i);
			
			
			 %>
			
			<tr><td><%=merchant.getId() %></td>
				<td><%=merchant.getMerchant_name() %></td>
				<td><%=merchant.getMerchant_address() %></td>
				<td><%=merchant.getMerchant_cellphone() %></td>
				<td><%=merchant.getMerchant_email() %></td>
				<td><%=merchant.getMerchant_local_x() %></td>
				<td><%=merchant.getMerchant_local_y()%></td>
				<td><%=merchant.getMerchant_QQ() %></td>
				<td><%=merchant.getMerchant_weixin() %></td>
				<td><a href="deleteMerchant.do?id=<%=merchant.getId() %>">删除</a></td>
				<td><a href="updatepMerchant.do?id=<%=merchant.getId() %>">更新</a></td>
			</tr>
			<%
			
			}
			
			 %>
			
		</table>
		<jsp:include page="page.jsp"></jsp:include>
	</center>
</body>
</html>
